<?php 
	require('include/top.php');

	if (!empty($_GET['id']))
	{
		$link = mysql_connect(DB_HOST, DB_USER, DB_PWD);
		
		$id = $_GET['id'];
		$articles = Article::getAll();
		$article = $articles[0];
		$article->delete($id);
		
		mysql_close($link);
	}
	
	header("Location: index.php");
 ?> 